home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / Art Department Pro 2.15 d3.adf / Install-Patches < prev    next >
Text File  |  1992-05-12  |  12KB  |  425 lines

  1. ;  This will do patches for ADPro 2.1.5
  2.  
  3. ; This procedure will patch a file
  4. ; requires initialization of variables:
  5. ;    patch_type
  6. ;    patch_thisfile
  7. ;    patch_dir
  8. ;    patch_curnum
  9. ;    patch_maxnum
  10. ;    patch_cksum_0
  11. ;    patch_cksum_1
  12. ;    patch_cksum_2
  13. ;    patch_cksum_3
  14.  
  15. (procedure patch_file
  16.     (if (= 1 (exists (tackon patch_dir patch_thisfile)))
  17.         (
  18.             (working ("Updating your %s %s...\n\nPlease read the ReadMe file on the ADPro Disk #1 after completing installation." patch_thisfile patch_type))
  19.             (set fsum (getsum (tackon patch_dir patch_thisfile)))
  20.             (while (< patch_curnum patch_maxnum)
  21.                 (
  22.                     (set tsum (select patch_curnum patch_cksum_0 patch_cksum_1 patch_cksum_2 patch_cksum_3 patch_cksum_4 patch_cksum_5 0))
  23.                     (if (= tsum fsum)
  24.                         (
  25.                             (run ("RAM:lz -N -wRam: x ADPRO2.D3:%s_Patches.lzh %s.%ld.PCH RAM:" patch_type patch_thisfile patch_curnum))
  26.                             (set rline (cat "RAM:lpatch " ("-o%s " (tackon "RAM:" patch_thisfile)) ("-p%s.%ld.PCH \"%s\"" (tackon "RAM:" patch_thisfile) patch_curnum (tackon patch_dir patch_thisfile))))
  27.                             (if (= 0 (run rline))
  28.                                 (
  29.                                     (protect (tackon patch_dir patch_thisfile) "+rwed")
  30.                                     (copyfiles
  31.                                         (prompt "")
  32.                                         (help "")
  33.                                         (source (tackon "RAM:" patch_thisfile))
  34.                                         (dest patch_dir)
  35.                                     )
  36.                                     (delete (tackon "RAM:" patch_thisfile))
  37.                                     (delete ("RAM:%s.%ld.PCH" patch_thisfile patch_curnum))
  38.                                     (set patch_curnum (+ patch_maxnum 1))
  39.                                 )
  40.                             )
  41.                         )
  42.                     )
  43.                 )
  44.                 (set patch_curnum (+ patch_curnum 1))
  45.             )
  46.             (if
  47.                 (= patch_curnum patch_maxnum)
  48.                 (message
  49.                     ("The attempt to patch the %s %s failed.\n\n" patch_thisfile patch_type)
  50.                     "This may have happened because the file has already been patched "
  51.                     "or the file is corrupted.  Please install the module(s) again and retry the patch."
  52.                 )
  53.             )
  54.         )
  55.         (
  56.             (message
  57.                 ("The %s %s " patch_thisfile patch_type)
  58.                 ("did not exist in your %ss2 directory.\n\n" patch_type)
  59.                 "Please install the module again and retry this patch."
  60.             )
  61.         )
  62.     )
  63. )
  64.  
  65. (set @default-dest
  66.     (askdir
  67.         (prompt "Please select directory into which you have installed ADPro.")
  68.         (help
  69.             "You must select the directory into which Art Department Professional was installed.\n\n"
  70.             @askdir-help
  71.         )
  72.         (default "SYS:ADPro")
  73.     )
  74. )
  75.  
  76. (set loaddir (tackon @default-dest "Loaders2"))
  77. (if
  78.     (= (exists loaddir) 0)
  79.     (abort "Loaders2 Directory Does Not Exist.")
  80. )
  81.  
  82. (set savedir (tackon @default-dest "Savers2"))
  83. (if
  84.     (= (exists savedir) 0)
  85.     (abort "Savers2 Directory Does Not Exist.")
  86. )
  87.  
  88. (copylib
  89.     (prompt "Copying arp.library to LIBS:")
  90.     (help
  91.         "This library is required to install ADPro.  If you already have a copy of "
  92.         "this library, the library included in this install is an update to the "
  93.         "library you currently have installed.\n\n"
  94.         @copylib-help
  95.     )
  96.     (source "ADPRO2.D3:libs/arp.library")
  97.     (dest "LIBS:")
  98.     (confirm)
  99. )
  100.  
  101. (copyfiles
  102.     (prompt "" )
  103.     (help "")
  104.     (source "ADPRO2.D3:C/lpatch")
  105.     (dest "RAM:")
  106. )
  107. (if
  108.     (= 0 (exists "RAM:lpatch"))
  109.     (abort "Unable to copy necessary files to Ram Disk."
  110.          "  Please make sure you have at least 100K of memory"
  111.          " available before installing."
  112.     )
  113. )
  114.  
  115. (copyfiles
  116.     (prompt "" )
  117.     (help "")
  118.     (source "ADPRO2.D3:C/lz")
  119.     (dest "RAM:")
  120. )
  121. (if
  122.     (= 0 (exists "RAM:lz"))
  123.     (abort "Unable to copy necessary files to Ram Disk."
  124.          "  Please make sure you have at least 100K of memory"
  125.          " available before installing."
  126.     )
  127. )
  128.  
  129. (set ptodo
  130.     (askoptions
  131.         (prompt "Select previously installed expansion modules to patch?")
  132.         (help 
  133.             "In addition to the basic ADPro system, ASDG offers several expansion "
  134.             "modules giving you added capabilities.  These expansion modules include "
  135.             "scanner controllers, film recorder controllers, and the ability to read and "
  136.             "write additional file formats. "
  137.             "\n\n"
  138.             "If you are upgrading from ADPro 1.0.3 or earlier, you might already own some "
  139.             "of our expansion modules. If so, read on. "
  140.             "\n\n"
  141.             "If you don't own any of the expansion modules now, you can skip this "
  142.             "step but before you do so, please read the following paragraphs. "
  143.             "\n\n"
  144.             "If ADPro 2.1 is your first version of ADPro, or you don't own any "
  145.             "expansion modules now, it is possible that when you purchase expansion "
  146.             "modules in the future, you may get an older version.  If this happens, "
  147.             "ADPro 2.1 will alert you with a message when you try to execute an "
  148.             "expansion module designed for a previous version of ADPro. "
  149.             "\n\n"
  150.             "If you find that you have purchased an older expansion module, you can "
  151.             "re-execute this installation program and select only this step to apply the "
  152.             "patches contained here. "
  153.             "\n\n"
  154.             "If you don't need to perform any of the patches at this time, you can stop "
  155.             "reading now. "
  156.             "\n\n"
  157.             "The modules which this sequence can patch include:  JXSCAN, JX100, ES300C, "
  158.             "PHOVOS300C, SV6510, CI3000, and the Professional Conversion Pack (Targa, "
  159.             "Tiff, and Rendition). "
  160.             "\n\n"
  161.             "To have these patches work, the modules to be patched must be installed in "
  162.             "their proper places in the directory in which you just installed ADPro 2.1. "
  163.             "This may mean that you have to re-install your expansion modules where you "
  164.             "just installed ADPro 2.1.  If so, exit this sequence for now, re-install "
  165.             "the expansion modules, execute this sequence again and select only "
  166.             "this last step. "
  167.             "\n\n"
  168.             "If the expansion modules to be patched are already located in the Loaders2 "
  169.             "and Savers2 directory where you just installed ADPro 2.1, then you may proceed "
  170.             "with the sequence. "
  171.             "\n\n"
  172.             "If you have additional difficulties or questions, call ASDG at (608) 273 "
  173.             "6585 and have your ADPro serial number ready. "
  174.         )
  175.         (choices
  176.             "Pro Conversion Pack"
  177.             "JX100"
  178.             "JXSCAN"
  179.             "EPSON_ES300C"
  180.             "PHOVOS_300C"
  181.             "CI3000"
  182.             "SV6510"
  183.         )
  184.         (default 1)
  185.     )
  186. )
  187. (if (= ptodo 0)
  188.     (abort "You didn't select anything, so there's nothing to do.")
  189. )
  190.  
  191. ; this patches optional loaders
  192. (set patch_cksum_0 0)
  193. (set patch_cksum_1 0)
  194. (set patch_cksum_2 0)
  195. (set patch_cksum_3 0)
  196. (set patch_cksum_4 0)
  197. (set patch_cksum_5 0)
  198. (set @execute-dir "RAM:")
  199. (if (IN ptodo 0)
  200.     (
  201.         ; patching RENDITION Loader
  202.         (set patch_thisfile "RENDITION")
  203.         (set patch_dir loaddir)
  204.         (set patch_type "Loader")
  205.         (set patch_curnum 0)
  206.         (set patch_maxnum 3)
  207.         (set patch_cksum_0 -784668211)
  208.         (set patch_cksum_1 1509760538)
  209.         (set patch_cksum_2 -1088099858)
  210.         (patch_file)
  211.         ;patching TARGA Loader
  212.         (set patch_thisfile "TARGA")
  213.         (set patch_dir loaddir)
  214.         (set patch_type "Loader")
  215.         (set patch_curnum 0)
  216.         (set patch_maxnum 6)
  217.         (set patch_cksum_0 1482780211)
  218.         (set patch_cksum_1 -483001049)
  219.         (set patch_cksum_2 244623600)
  220.         (set patch_cksum_3 -1058239812)
  221.         (set patch_cksum_4 -1058239812)
  222.         (set patch_cksum_5 828958717)
  223.         (patch_file)
  224.         ;patching TIFF Loader
  225.         (set patch_thisfile "TIFF")
  226.         (set patch_dir loaddir)
  227.         (set patch_type "Loader")
  228.         (set patch_curnum 0)
  229.         (set patch_maxnum 4)
  230.         (set patch_cksum_0 859597812)
  231.         (set patch_cksum_1 819297291)
  232.         (set patch_cksum_2 1518344491)
  233.         (set patch_cksum_3 -1641822233)
  234.         (patch_file)
  235.         (working "Creating X Loader...\n\nPlease read the ReadMe file on the ADPro Disk #1 after completing installation.")
  236.         (run "RAM:lz -N -wRam: x ADPRO2.D3:Loader_Patches.lzh X.0.PCH RAM:")
  237.         (set rline ("RAM:lpatch -oRAM:X -pRAM:X.0.PCH \"%s\"" (tackon loaddir "RENDITION")))
  238.         (if (= 0 (run rline))
  239.             (
  240.                 (copyfiles
  241.                     (prompt "")
  242.                     (help "")
  243.                     (source "RAM:X")
  244.                     (dest patch_dir)
  245.                 )
  246.                 (delete "RAM:X")
  247.                 (delete "RAM:X.0.PCH")
  248.             )
  249.         )
  250.         (working "Creating SUNRASTER Loader...\n\nPlease read the ReadMe file on the ADPro Disk #1 after completing installation.")
  251.         (run "RAM:lz -N -wRam: x ADPRO2.D3:Loader_Patches.lzh SUNRASTER.0.PCH RAM:")
  252.         (set rline ("RAM:lpatch -oRAM:SUNRASTER -pRAM:SUNRASTER.0.PCH \"%s\"" (tackon loaddir "RENDITION")))
  253.         (if (= 0 (run rline))
  254.             (
  255.                 (copyfiles
  256.                     (prompt "")
  257.                     (help "")
  258.                     (source "RAM:SUNRASTER")
  259.                     (dest patch_dir)
  260.                 )
  261.                 (delete "RAM:SUNRASTER")
  262.                 (delete "RAM:SUNRASTER.0.PCH")
  263.             )
  264.         )
  265.         ;patching RENDITION Saver
  266.         (set patch_thisfile "RENDITION")
  267.         (set patch_dir savedir)
  268.         (set patch_type "Saver")
  269.         (set patch_curnum 0)
  270.         (set patch_maxnum 3)
  271.         (set patch_cksum_0 -1958352664)
  272.         (set patch_cksum_1 1939121335)
  273.         (set patch_cksum_2 1418874756)
  274.         (patch_file)
  275.         ;patching TARGA Saver
  276.         (set patch_thisfile "TARGA")
  277.         (set patch_dir savedir)
  278.         (set patch_type "Saver")
  279.         (set patch_curnum 0)
  280.         (set patch_maxnum 3)
  281.         (set patch_cksum_0 242601535)
  282.         (set patch_cksum_1 -2024131800)
  283.         (set patch_cksum_2 -1841823675)
  284.         (patch_file)
  285.         ;patching TIFF Saver
  286.         (set patch_thisfile "TIFF")
  287.         (set patch_dir savedir)
  288.         (set patch_type "Saver")
  289.         (set patch_curnum 0)
  290.         (set patch_maxnum 4)
  291.         (set patch_cksum_0 1720074818)
  292.         (set patch_cksum_1 -1977315916)
  293.         (set patch_cksum_2 -1780612422)
  294.         (set patch_cksum_3 1124297027)
  295.         (patch_file)
  296.         (working "Creating X Saver...\n\nPlease read the ReadMe file on the ADPro Disk #1 after completing installation.")
  297.         (run "RAM:lz -N -wRam: x ADPRO2.D3:Saver_Patches.lzh X.0.PCH RAM:")
  298.         (set rline ("RAM:lpatch -oRAM:X -pRAM:X.0.PCH \"%s\"" (tackon savedir "RENDITION")))
  299.         (if (= 0 (run rline))
  300.             (
  301.                 (copyfiles
  302.                     (prompt "")
  303.                     (help "")
  304.                     (source "RAM:X")
  305.                     (dest patch_dir)
  306.                 )
  307.                 (delete "RAM:X")
  308.                 (delete "RAM:X.0.PCH")
  309.             )
  310.         )
  311.         (working "Creating SUNRASTER Saver...\n\nPlease read the ReadMe file on the ADPro Disk #1 after completing installation.")
  312.         (run "RAM:lz -N -wRam: x ADPRO2.D3:Saver_Patches.lzh SUNRASTER.0.PCH RAM:")
  313.         (set rline ("RAM:lpatch -oRAM:SUNRASTER -pRAM:SUNRASTER.0.PCH \"%s\"" (tackon savedir "RENDITION")))
  314.         (if (= 0 (run rline))
  315.             (
  316.                 (copyfiles
  317.                     (prompt "")
  318.                     (help "")
  319.                     (source "RAM:SUNRASTER")
  320.                     (dest patch_dir)
  321.                 )
  322.                 (delete "RAM:SUNRASTER")
  323.                 (delete "RAM:SUNRASTER.0.PCH")
  324.             )
  325.         )
  326.     )
  327. )
  328.  
  329. (if (IN ptodo 1)
  330.     (
  331.         ; patching JX100 Loader
  332.         (set patch_thisfile "JX100")
  333.         (set patch_dir loaddir)
  334.         (set patch_type "Loader")
  335.         (set patch_curnum 0)
  336.         (set patch_maxnum 4)
  337.         (set patch_cksum_0 -774386942)
  338.         (set patch_cksum_1 -1457757454)
  339.         (set patch_cksum_2 1395406761)
  340.         (set patch_cksum_3 -648704505)
  341.         (patch_file)
  342.     )
  343. )
  344.  
  345. (if (IN ptodo 2)
  346.     (
  347.         ; patching JXSCAN Loader
  348.         (set patch_thisfile "JXSCAN")
  349.         (set patch_dir loaddir)
  350.         (set patch_type "Loader")
  351.         (set patch_curnum 0)
  352.         (set patch_maxnum 3)
  353.         (set patch_cksum_0 919621839)
  354.         (set patch_cksum_1 1052076838)
  355.         (set patch_cksum_2 1434661152)
  356.         (patch_file)
  357.     )
  358. )
  359.  
  360. (if (IN ptodo 3)
  361.     (
  362.         ; patching EPSON_ES300C Loader
  363.         (set patch_thisfile "EPSON_ES300C")
  364.         (set patch_dir loaddir)
  365.         (set patch_type "Loader")
  366.         (set patch_curnum 0)
  367.         (set patch_maxnum 3)
  368.         (set patch_cksum_0 539717622)
  369.         (set patch_cksum_1 477972192)
  370.         (set patch_cksum_2 -1329441256)
  371.         (patch_file)
  372.     )
  373. )
  374.  
  375. (if (IN ptodo 4)
  376.     (
  377.         ; patching PHOVOS_300C Loader
  378.         (set patch_thisfile "PHOVOS_300C")
  379.         (set patch_dir loaddir)
  380.         (set patch_type "Loader")
  381.         (set patch_curnum 0)
  382.         (set patch_maxnum 3)
  383.         (set patch_cksum_0 2114945872)
  384.         (set patch_cksum_1 -2119905465)
  385.         (set patch_cksum_2 1503818038)
  386.         (patch_file)
  387.     )
  388. )
  389.  
  390. (if (IN ptodo 5)
  391.     (
  392.         ; patching CI3000 Saver
  393.         (set patch_thisfile "CI3000")
  394.         (set patch_dir savedir)
  395.         (set patch_type "Saver")
  396.         (set patch_curnum 0)
  397.         (set patch_maxnum 3)
  398.         (set patch_cksum_0 -352502906)
  399.         (set patch_cksum_1 -1846595266)
  400.         (set patch_cksum_2 -1212497233)
  401.         (patch_file)
  402.     )
  403. )
  404.  
  405. (if (IN ptodo 6)
  406.     (
  407.         ; patching SV6510 Saver
  408.         (set patch_thisfile "SV6510")
  409.         (set patch_dir savedir)
  410.         (set patch_type "Saver")
  411.         (set patch_curnum 0)
  412.         (set patch_maxnum 2)
  413.         (set patch_cksum_0 1138320904)
  414.         (set patch_cksum_1 -776414085)
  415.         (patch_file)
  416.     )
  417. )
  418.  
  419. (if (= 1 (exists "RAM:lpatch"))
  420.     (delete "RAM:lpatch")
  421. )
  422. (if (= 1 (exists "RAM:lz"))
  423.     (delete "RAM:lz")
  424. )
  425.